// src/model/video.rs  
use sea_orm::entity::prelude::*;  
use chrono::NaiveDateTime;  

#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]  
#[sea_orm(table_name = "videos")]  
pub struct Model {  // 模型名称为 Model  
    #[sea_orm(primary_key, auto_increment = true)]  
    pub id: i32,  
    pub title: String,  
    pub url: String,  
    #[sea_orm(default_value = "CURRENT_TIMESTAMP")]  
    pub created_at: NaiveDateTime,  
    #[sea_orm(default_value = "CURRENT_TIMESTAMP", on_update = "CURRENT_TIMESTAMP")]  
    pub updated_at: NaiveDateTime,  
    #[sea_orm(nullable)]  
    pub deleted_at: Option<NaiveDateTime>,  
}  

// 关系定义  
#[derive(Copy, Clone, Debug, EnumIter)]  
pub enum Relation {}  

impl RelationTrait for Relation {  
    fn def(&self) -> RelationDef {  
        panic!("No relations are defined")  
    }  
}  

impl ActiveModelBehavior for ActiveModel {}